Camera preview via video tag

ABSTRACT

In one embodiment, a computing device incorporating a camera receives an instruction associated with the camera to display an image generated by the camera in an area within a graphical user interface of an application running on the computing device. The computing device determines a width and a height of the area. The computing device instructs the camera to configure the image, in connection with its generation, for display in the area. And the computing device displays in the area the image as generated and configured by the camera.

PRIORITY

This application is a continuation under 35 U.S.C. §120 of U.S. patentapplication Ser. No. 13/655,845, filed 19 Oct. 2012.

TECHNICAL FIELD

This disclosure generally relates to mobile computing devices.

BACKGROUND

A mobile computing device—such as a smartphone, tablet computer, orlaptop computer—may include functionality for determining its location,direction, or orientation, such as a GPS receiver, compass, orgyroscope. Such a device may also include functionality for wirelesscommunication, such as BLUETOOTH communication, near-field communication(NFC), or infrared (IR) communication or communication with a wirelesslocal area networks (WLANs) or cellular-telephone network. Such a devicemay also include one or more cameras, scanners, touchscreens,microphones, or speakers. Mobile computing devices may also executesoftware applications, such as games, web browsers, or social-networkingapplications. With social-networking applications, users may connect,communicate, and share information with other users in their socialnetworks.

SUMMARY OF PARTICULAR EMBODIMENTS

In particular embodiments, a camera-preview video may be directlyinjected into a Hypertext Markup Language (HTML) video tag. Instead ofhaving software re-size or post-scale the camera-preview video based ona size specified by the video tag, particular embodiments directlyinstruct the camera to reconfigure its output size in hardware to matchthe size specified by the video tag.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates an example method for displaying a camera previewwindow.

FIGS. 2A and 2B illustrate an example camera preview window.

FIG. 3 illustrates an example computer system.

DESCRIPTION OF EXAMPLE EMBODIMENTS

A structured document such as a web page may include, for example, pagelayout information, scripts, page content such as text, media data(e.g., graphics, photos, video clips), and executable code objects(e.g., a game executable within a browser window or frame). Structureddocuments may be implemented with languages and technologies such asHypertext Markup Language (HTML), Extensible Markup Language (XML),Extensible Hypertext Markup Language (XHTML), JavaScript, WebGL,Cascading Style Sheet (CSS) including CSS animations and transitions,and, frequently, Java. A structured document may itself includereferences to multiple structured documents and contents. For example, aweb page may include one or more inline references by incorporatingUniform Resource Locations (URLs) and/or script code (e.g., JavaScript,PHP, AJAX) that in response to a user event (e.g., a mouse click, amouse hover-over), causes an application displaying the web page in agraphical user interface to dynamically retrieve content specified by anURL and the script code.

A layout engine (or web browser engine) is a software component orlibrary for rendering structured documents in a graphical userinterface. For example, Google's Chrome web browser and Apple's Safariweb browser use WebKit software to render web pages. WebKit includes alayout engine WebCore and a JavaScript engine JavaScriptCore (forinterpreting and executes JavaScript code). An application hosted by acomputing device may utilize a layout engine to render structureddocuments by incorporating modules in the layout engine via anapplication programming interface (API) to the layout engine. Arendering process of an application incorporating a layout engine mayaccess a structured document (e.g., a web page), and divide thestructured document into one or more layers—e.g., based on HTML <div> or<iframe> tags. The rendering process may parse each layer into a renderobject data structure. For example, the rendering process may parse alayer of a structured document into a render object tree or a tree ofnodes in Document Object Model (DOM) representation, wherein each nodeof a tree of nodes may comprise text, an image object, other DOM object,or a pointer or root of another tree of nodes. The rendering process maygenerate a raster image (i.e., a bitmap image) for each layer based onthe render object tree and composite or combine raster images of the oneor more layers into a single image to be displayed in a graphical userinterface.

A structured document may include an image (e.g., a photo, a video) byusing an HTML iframe tag. The image may have an intrinsic resolution inwidth and height (e.g., 1080 pixels in width and 810 pixels in height)as generated by its source such as a camera. On the other hand, thestructured document may specify a different size in width and height fordisplaying the image (e.g., by specifying with <iframe width=“560”height=“420” src=“[example source]”></iframe>), causing a renderingprocess to scale or re-size the image to match the size specified by theiframe tag while rendering the structured document. That is, therendering process of the structured document may re-size or post-scalethe image after the image is generated by its source. Here, re-sizing animage denotes changing a height or a width of the image. Here, scalingan image denotes changing a height and a width of the image whilekeeping the image's aspect ratio constant. Particular embodimentsdescribe methods for re-sizing or scaling an image in a structureddocument as the image is generated. For example, particular embodimentsmay display in a user interface a video stream generated by a camera asa camera preview window (i.e., a camera viewfinder). Particularembodiments may determine a width and a height of the camera previewwindow, and instruct the camera to configure its output in the videostream to match the width and height of the camera preview window.

FIG. 1 illustrates an example method 100 for displaying a camera previewwindow. The example method 100 may be implemented by a computing device.For example, the example method 100 may be implemented by a process ofan application (or an operating system) executing on one or moreprocessors of the computing device. The computing device may be adesktop computer, a laptop computer, a tablet computer, a smartphone, orany suitable computing device. In particular embodiments, the computingdevice may comprise a camera. The example method 100 may begin at step110. In particular embodiments, at step 110, the computing device mayreceive an instruction associated with the camera to display an image inan area within a graphical user interface of an application executing onthe computing device. In particular embodiments, the image may be aphoto or a video generated by the camera.

For example, the computing device may display in its display anapplication's graphical user interface including an area that displaysan image generated by the camera. The computing device (e.g., a processof the application) may instruct the camera to display the image in thearea via an API or a device driver of the camera. In particularembodiments, the image may be a real-time video generated by the camera.That is, the area may correspond to a camera preview window for thecamera of the computing device. In particular embodiments, the area fordisplaying a real-time video generated by the camera may comprise anHTML video tag (e.g., included in a structured document corresponding tothe graphical user interface), while a source of the video tag may pointto the camera of the computing device. That is, the computing device mayinject the real-time video generated by the camera into the video tag.FIG. 2A illustrates an example camera preview window. In the example ofFIG. 2A, a computing device may display in its touch display 200 agraphical user interface 210 of an application executing on thecomputing device. The graphical user interface 210 may include a camerapreview window 220 that displays a real-time video generated by thecamera of the computing device.

In particular embodiments, at step 120, the computing device maydetermine a width and a height of the area. For example, the computingdevice may determine a width and a height of the area as the width andheight attributes specified by the HTML video tag. For example, thewidth and height attributes may be specified in the HTML video tag as<video width=“320” height=“240” src=“[camera source]”></video>. Thewidth and height of the area may be specified by the application or anoperating system of the computing device. The width and height of thearea may also be specified by a user of the computing device. Forexample, a user may perform one or more pinch-in or pinch-out touchgestures on the camera preview window 220 illustrated in FIG. 2A tochange the size of the camera preview window 220.

In particular embodiments, at step 130, the computing device mayinstruct the camera to configure the image, in connection with itsgeneration, for display in the area (with the width and height of thearea in connection). The computing device may instruct the camera tore-scale or re-size its outputted image to match the width and height ofthe area (e.g., as specified by an HTML video tag). In particularembodiments, at step 140, the computing device may display in the areathe image as generated and configured by the camera. For example, thecomputing device may, via an API or a device driver of the camera,instruct the camera to configure the real-time video output with a sameresolution as the width and height of the area, and display thereal-time video generated and configured by the camera in the area. Thatis, the computing device may configure the camera to generate areal-time video at the required width and height natively (i.e., by thecamera hardware), instead of re-sizing or post-scaling the real-timevideo with software (e.g., by using a layout engine rendering thegraphical user interface). Generating the real-time video at therequired width and height natively may have a better speed performance(vs. re-sizing or post-scaling with software) as it is implemented witha dedicated hardware and thus may provide better user experience (e.g.,smoother and more lively video). Generating the real-time video at therequired width and height natively may also have a lower powerconsumption (vs. re-sizing or post-scaling with software) as it isimplemented with a dedicated hardware.

In addition, in particular embodiments, the computing device may displayin the graphical user interface one or more camera control elements. Thecomputing device may display in the graphical user interface one or moreelements controlling any suitable functions of the camera. For exampleand without limitation, the computing device may display in thegraphical user interface one or more elements for controlling photocapture, video recording, color or monochrome mode selection, exposuretime adjustment, focal-length adjustment, white-balancing, aperture sizeadjustment, light sensitivity adjustment (ISO or InternationalOrganization for Standardization speed), or auto-focusing mode selectionof the camera.

FIG. 2B illustrates example camera controller elements displayed in thecamera preview window illustrated in FIG. 2A. As in the example of FIG.2A, the computing device may display (in touch display 200) thegraphical user interface 210 of an application. The graphical userinterface 210 may include the camera preview window 220 that displays areal-time video generated by the camera of the computing device. Thecomputer device may also display a photo capture control element 231, awhite balance adjustment control element 232, and a scrollable exposuretime control element 233 within the camera preview window 220. Inparticular embodiments, the camera control elements may be implementedas JavaScript event. A program running on the computing device maydetect and process such events (e.g., a photo is captured, the camera isset at auto-focusing mode, and so on) by subscribing as listeners tothose events.

In the example of FIG. 2B, a user of the computing device may controlfunctions of the camera by performing touch gestures on touch display200. That is, the user can interact with those control elementsdisplayed in the graphical user interface to control detailed camerafunctions. For example, the user may perform a tap touch gesture on thecontrol element 231. In response to the tap touch gesture, theapplication may instruct the camera (e.g., via an API or a device driverof the camera) to capture a photo. For example, the user may perform atap touch gesture on the control element 232. In response to the taptouch gesture, the application may instruct the camera to turn on (oroff) white-balancing function of the camera. For example, the user mayperform a swipe touch gesture on the scrollable control element 232 toselect a desirable exposure time (e.g., 1/60). In response to the swipetouch gesture, the application may instruct the camera to adjust to thedesirable exposure time.

In particular embodiments, as the image or the camera controllerelements may be represented as HTML DOM elements, the computing device(e.g., a rendering process for the graphical user interface) may createanimation (e.g., by using CSS) for one or more of the content elementsin the graphical user interface. For example, a user may perform a slidetouch gesture on touch display 200 illustrated in FIG. 2B to move thecontrol element 231 from the right side of the camera preview window 220to the left side of the camera preview window 220. A rendering processfor the graphical user interface 210 may create raster images of DOMelements of the graphical user interface (e.g., a DOM element for thearea 220, a DOM element for control element 231, a DOM element forcontrol element 232, a DOM element for control element 233, and so on).The rendering process may composite the raster images into a sequence ofimages, creating an animation effect of the control element 231following the user's slide touch gesture from the right side to the leftside of the camera preview window 220.

Particular embodiments may repeat one or more steps of the method ofFIG. 1, where appropriate. Although this disclosure describes andillustrates particular steps of the method of FIG. 1 as occurring in aparticular order, this disclosure contemplates any suitable steps of themethod of FIG. 1 occurring in any suitable order. Moreover, althoughthis disclosure describes and illustrates particular components,devices, or systems carrying out particular steps of the method of FIG.1, this disclosure contemplates any suitable combination of any suitablecomponents, devices, or systems carrying out any suitable steps of themethod of FIG. 1.

FIG. 3 illustrates an example computer system 300. In particularembodiments, one or more computer systems 300 perform one or more stepsof one or more methods described or illustrated herein. In particularembodiments, one or more computer systems 300 provide functionalitydescribed or illustrated herein. In particular embodiments, softwarerunning on one or more computer systems 300 performs one or more stepsof one or more methods described or illustrated herein or providesfunctionality described or illustrated herein. Particular embodimentsinclude one or more portions of one or more computer systems 300.Herein, reference to a computer system may encompass a computing device,and vice versa, where appropriate. Moreover, reference to a computersystem may encompass one or more computer systems, where appropriate.

This disclosure contemplates any suitable number of computer systems300. This disclosure contemplates computer system 300 taking anysuitable physical form. As example and not by way of limitation,computer system 300 may be an embedded computer system, a system-on-chip(SOC), a single-board computer system (SBC) (such as, for example, acomputer-on-module (COM) or system-on-module (SOM)), a desktop computersystem, a laptop or notebook computer system, an interactive kiosk, amainframe, a mesh of computer systems, a mobile telephone, a personaldigital assistant (PDA), a server, a tablet computer system, or acombination of two or more of these. Where appropriate, computer system300 may include one or more computer systems 300; be unitary ordistributed; span multiple locations; span multiple machines; spanmultiple data centers; or reside in a cloud, which may include one ormore cloud components in one or more networks. Where appropriate, one ormore computer systems 300 may perform without substantial spatial ortemporal limitation one or more steps of one or more methods describedor illustrated herein. As an example and not by way of limitation, oneor more computer systems 300 may perform in real time or in batch modeone or more steps of one or more methods described or illustratedherein. One or more computer systems 300 may perform at different timesor at different locations one or more steps of one or more methodsdescribed or illustrated herein, where appropriate.

In particular embodiments, computer system 300 includes a processor 302,memory 304, storage 306, an input/output (I/O) interface 308, acommunication interface 310, and a bus 312. Although this disclosuredescribes and illustrates a particular computer system having aparticular number of particular components in a particular arrangement,this disclosure contemplates any suitable computer system having anysuitable number of any suitable components in any suitable arrangement.

In particular embodiments, processor 302 includes hardware for executinginstructions, such as those making up a computer program. As an exampleand not by way of limitation, to execute instructions, processor 302 mayretrieve (or fetch) the instructions from an internal register, aninternal cache, memory 304, or storage 306; decode and execute them; andthen write one or more results to an internal register, an internalcache, memory 304, or storage 306. In particular embodiments, processor302 may include one or more internal caches for data, instructions, oraddresses. This disclosure contemplates processor 302 including anysuitable number of any suitable internal caches, where appropriate. Asan example and not by way of limitation, processor 302 may include oneor more instruction caches, one or more data caches, and one or moretranslation lookaside buffers (TLBs). Instructions in the instructioncaches may be copies of instructions in memory 304 or storage 306, andthe instruction caches may speed up retrieval of those instructions byprocessor 302. Data in the data caches may be copies of data in memory304 or storage 306 for instructions executing at processor 302 tooperate on; the results of previous instructions executed at processor302 for access by subsequent instructions executing at processor 302 orfor writing to memory 304 or storage 306; or other suitable data. Thedata caches may speed up read or write operations by processor 302. TheTLBs may speed up virtual-address translation for processor 302. Inparticular embodiments, processor 302 may include one or more internalregisters for data, instructions, or addresses. This disclosurecontemplates processor 302 including any suitable number of any suitableinternal registers, where appropriate. Where appropriate, processor 302may include one or more arithmetic logic units (ALUs); be a multi-coreprocessor; or include one or more processors 302. Although thisdisclosure describes and illustrates a particular processor, thisdisclosure contemplates any suitable processor.

In particular embodiments, memory 304 includes main memory for storinginstructions for processor 302 to execute or data for processor 302 tooperate on. As an example and not by way of limitation, computer system300 may load instructions from storage 306 or another source (such as,for example, another computer system 300) to memory 304. Processor 302may then load the instructions from memory 304 to an internal registeror internal cache. To execute the instructions, processor 302 mayretrieve the instructions from the internal register or internal cacheand decode them. During or after execution of the instructions,processor 302 may write one or more results (which may be intermediateor final results) to the internal register or internal cache. Processor302 may then write one or more of those results to memory 304. Inparticular embodiments, processor 302 executes only instructions in oneor more internal registers or internal caches or in memory 304 (asopposed to storage 306 or elsewhere) and operates only on data in one ormore internal registers or internal caches or in memory 304 (as opposedto storage 306 or elsewhere). One or more memory buses (which may eachinclude an address bus and a data bus) may couple processor 302 tomemory 304. Bus 312 may include one or more memory buses, as describedbelow. In particular embodiments, one or more memory management units(MMUs) reside between processor 302 and memory 304 and facilitateaccesses to memory 304 requested by processor 302. In particularembodiments, memory 304 includes random access memory (RAM). This RAMmay be volatile memory, where appropriate Where appropriate, this RAMmay be dynamic RAM (DRAM) or static RAM (SRAM). Moreover, whereappropriate, this RAM may be single-ported or multi-ported RAM. Thisdisclosure contemplates any suitable RAM. Memory 304 may include one ormore memories 304, where appropriate. Although this disclosure describesand illustrates particular memory, this disclosure contemplates anysuitable memory.

In particular embodiments, storage 306 includes mass storage for data orinstructions. As an example and not by way of limitation, storage 306may include a hard disk drive (HDD), a floppy disk drive, flash memory,an optical disc, a magneto-optical disc, magnetic tape, or a UniversalSerial Bus (USB) drive or a combination of two or more of these. Storage306 may include removable or non-removable (or fixed) media, whereappropriate. Storage 306 may be internal or external to computer system300, where appropriate. In particular embodiments, storage 306 isnon-volatile, solid-state memory. In particular embodiments, storage 306includes read-only memory (ROM). Where appropriate, this ROM may bemask-programmed ROM, programmable ROM (PROM), erasable PROM (EPROM),electrically erasable PROM (EEPROM), electrically alterable ROM (EAROM),or flash memory or a combination of two or more of these. Thisdisclosure contemplates mass storage 306 taking any suitable physicalform. Storage 306 may include one or more storage control unitsfacilitating communication between processor 302 and storage 306, whereappropriate. Where appropriate, storage 306 may include one or morestorages 306. Although this disclosure describes and illustratesparticular storage, this disclosure contemplates any suitable storage.

In particular embodiments, I/O interface 308 includes hardware,software, or both, providing one or more interfaces for communicationbetween computer system 300 and one or more I/O devices. Computer system300 may include one or more of these I/O devices, where appropriate. Oneor more of these I/O devices may enable communication between a personand computer system 300. As an example and not by way of limitation, anI/O device may include a keyboard, keypad, microphone, monitor, mouse,printer, scanner, speaker, still camera, stylus, tablet, touch screen,trackball, video camera, another suitable I/O device or a combination oftwo or more of these. An I/O device may include one or more sensors.This disclosure contemplates any suitable I/O devices and any suitableI/O interfaces 308 for them. Where appropriate, I/O interface 308 mayinclude one or more device or software drivers enabling processor 302 todrive one or more of these I/O devices. I/O interface 308 may includeone or more I/O interfaces 308, where appropriate. Although thisdisclosure describes and illustrates a particular I/O interface, thisdisclosure contemplates any suitable I/O interface.

In particular embodiments, communication interface 310 includeshardware, software, or both providing one or more interfaces forcommunication (such as, for example, packet-based communication) betweencomputer system 300 and one or more other computer systems 300 or one ormore networks. As an example and not by way of limitation, communicationinterface 310 may include a network interface controller (NIC) ornetwork adapter for communicating with an Ethernet or other wire-basednetwork or a wireless NIC (WNIC) or wireless adapter for communicatingwith a wireless network, such as a WI-FI network. This disclosurecontemplates any suitable network and any suitable communicationinterface 310 for it. As an example and not by way of limitation,computer system 300 may communicate with an ad hoc network, a personalarea network (PAN), a local area network (LAN), a wide area network(WAN), a metropolitan area network (MAN), or one or more portions of theInternet or a combination of two or more of these. One or more portionsof one or more of these networks may be wired or wireless. As anexample, computer system 300 may communicate with a wireless PAN (WPAN)(such as, for example, a BLUETOOTH WPAN), a WI-FI network, a WI-MAXnetwork, a cellular telephone network (such as, for example, a GlobalSystem for Mobile Communications (GSM) network), or other suitablewireless network or a combination of two or more of these. Computersystem 300 may include any suitable communication interface 310 for anyof these networks, where appropriate. Communication interface 310 mayinclude one or more communication interfaces 310, where appropriate.Although this disclosure describes and illustrates a particularcommunication interface, this disclosure contemplates any suitablecommunication interface.

In particular embodiments, bus 312 includes hardware, software, or bothcoupling components of computer system 300 to each other. As an exampleand not by way of limitation, bus 312 may include an AcceleratedGraphics Port (AGP) or other graphics bus, an Enhanced Industry StandardArchitecture (EISA) bus, a front-side bus (FSB), a HYPERTRANSPORT (HT)interconnect, an Industry Standard Architecture (ISA) bus, an INFINIBANDinterconnect, a low-pin-count (LPC) bus, a memory bus, a Micro ChannelArchitecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, aPCI-Express (PCIe) bus, a serial advanced technology attachment (SATA)bus, a Video Electronics Standards Association local (VLB) bus, oranother suitable bus or a combination of two or more of these. Bus 312may include one or more buses 312, where appropriate. Although thisdisclosure describes and illustrates a particular bus, this disclosurecontemplates any suitable bus or interconnect.

Herein, a computer-readable non-transitory storage medium or media mayinclude one or more semiconductor-based or other integrated circuits(ICs) (such, as for example, field-programmable gate arrays (FPGAs) orapplication-specific ICs (ASICs)), hard disk drives (HDDs), hybrid harddrives (HHDs), optical discs, optical disc drives (ODDs),magneto-optical discs, magneto-optical drives, floppy diskettes, floppydisk drives (FDDs), magnetic tapes, solid-state drives (SSDs),RAM-drives, SECURE DIGITAL cards or drives, any other suitablecomputer-readable non-transitory storage media, or any suitablecombination of two or more of these, where appropriate. Acomputer-readable non-transitory storage medium may be volatile,non-volatile, or a combination of volatile and non-volatile, whereappropriate.

Herein, “or” is inclusive and not exclusive, unless expressly indicatedotherwise or indicated otherwise by context. Therefore, herein, “A or B”means “A, B, or both,” unless expressly indicated otherwise or indicatedotherwise by context. Moreover, “and” is both joint and several, unlessexpressly indicated otherwise or indicated otherwise by context.Therefore, herein, “A and B” means “A and B, jointly or severally,”unless expressly indicated otherwise or indicated otherwise by context.

The scope of this disclosure encompasses all changes, substitutions,variations, alterations, and modifications to the example embodimentsdescribed or illustrated herein that a person having ordinary skill inthe art would comprehend. The scope of this disclosure is not limited tothe example embodiments described or illustrated herein. Moreover,although this disclosure describes and illustrates respectiveembodiments herein as including particular components, elements,functions, operations, or steps, any of these embodiments may includeany combination or permutation of any of the components, elements,functions, operations, or steps described or illustrated anywhere hereinthat a person having ordinary skill in the art would comprehend.Furthermore, reference in the appended claims to an apparatus or systemor a component of an apparatus or system being adapted to, arranged to,capable of, configured to, enabled to, operable to, or operative toperform a particular function encompasses that apparatus, system,component, whether or not it or that particular function is activated,turned on, or unlocked, as long as that apparatus, system, or componentis so adapted, arranged, capable, configured, enabled, operable, oroperative.

What is claimed is:
 1. A method comprising: by a mobile devicecomprising a camera, determining a width and a height of an area withina graphical user interface for displaying an image, wherein the image isto be captured by the camera; by the mobile device, instructing a devicedriver for the camera to configure the camera to capture the image inaccordance with the width and height of the area; and by the mobiledevice, displaying in the area the image as captured by the camera. 2.The method of claim 1, further comprising displaying in the graphicaluser interface the image to be captured by the camera.
 3. The method ofclaim 1, further comprising displaying in the graphical user interface astructured document comprising a Hypertext Markup Language (HTML) videotag, wherein the area is specified at least in part by the HTML videotag.
 4. The method of claim 1, wherein the image is a real-time video.5. The method of claim 1, further comprising displaying in the graphicaluser interface one or more camera control elements.
 6. The method ofclaim 5, wherein the camera control elements are implemented asJavaScript events.
 7. The method of claim 2, wherein the area isspecified at least in part by one or more gestures by a user of themobile computing device, wherein the gestures are associated with aportion of the graphical user interface displaying the image to becaptured by the camera.
 8. The method of claim 7, wherein one or more ofthe gestures comprise one or more pinch-in or pinch-out gestures.
 9. Oneor more computer-readable non-transitory storage media embodyingsoftware that is operable when executed by a mobile device comprising acamera to: determine a width and a height of an area within a graphicaluser interface for displaying the image, wherein the image is to becaptured by the camera; instruct a device driver for the camera toconfigure the camera to capture the image in accordance with the widthand height of the area; and display in the area the image as captured bythe camera.
 10. The media of claim 9, wherein the software is furtheroperable when executed to display in the graphical user interface theimage to be captured by the camera.
 11. The media of claim 9, whereinthe software is further operable when executed to display in thegraphical user interface a structured document comprising a HypertextMarkup Language (HTML) video tag, wherein the area is specified at leastin part by the HTML video tag.
 12. The media of claim 9, wherein theimage is a real-time video.
 13. The media of claim 9, wherein thesoftware is further operable when executed by the mobile device todisplay in the graphical user interface one or more camera controlelements.
 14. The media of claim 13, wherein the camera control elementsare implemented as JavaScript events.
 15. The media of claim 10, whereinthe area is specified at least in part by one or more gestures by a userof the mobile computing device, wherein the gestures are associated witha portion of the graphical user interface displaying the image to becaptured by the camera.
 16. The media of claim 15, wherein one or moreof the gestures comprise one or more pinch-in or pinch-out gestures. 17.A mobile device comprising: one or more processors; a camera coupled tothe processors; and a memory coupled to the processors comprisinginstructions executable by the processors, the processors being operablewhen executing the instructions to: determine a width and a height of anarea within a graphical user interface for displaying the image, whereinthe image is to be captured by the camera; instruct a device driver forthe camera to configure the camera to capture the image in accordancewith the width and height of the area; and display in the area the imageas captured by the camera.
 18. The mobile computing device of claim 17,wherein the processors are further operable when executing theinstructions to display in the graphical user interface the image to becaptured by the camera.
 19. The mobile device of claim 17, wherein thearea is specified at least in part by one or more of: a Hypertext MarkupLanguage (HTML) video tag; or a user of the mobile computing device. 20.The mobile device of claim 17, wherein the image is a real-time video.